-- GENERATED SPELL FOR [Warmaul Warlock] --


function spell0_18037(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18037', 3000, 1)
end

function spell1_18037(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(11939,pUnit)
pUnit:RegisterEvent('Sorts_18037', 682, 1)
end

function Sorts_18037(pUnit, Event)
local choix_sorts_18037 = math.random(0, 1)
if choix_sorts_18037 == 0 then
pUnit:RegisterEvent('spell0_18037', 1, 1)
end
if choix_sorts_18037 == 1 then
pUnit:RegisterEvent('spell1_18037', 1, 1)
end
end

function mob18037_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18037', math.random(1500, 3000), 1)
end

function mob18037_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18037_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18037_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18037, 1, 'mob18037_Action')
RegisterUnitEvent(18037, 2, 'mob18037_Leave')
RegisterUnitEvent(18037, 3, 'mob18037_Kill')
RegisterUnitEvent(18037, 4, 'mob18037_Die')
